<template>
  <div v-html="computedValue" />
</template>
<script>
export default {
  name: 'TitleExplain',
  props: {
    value: { // 是否配置中
      type: String,
      default: ''
    },
    isPreView: {
      type: Boolean,
      default: false
    }
  },

  computed: {
    computedValue() {
      if ((!this.value || this.value === '<p><br></p>')) {
        return this.isPreView ? '标题说明' : '';
      } else {
        return this.value;
      }
    }
  }
};
</script>
